home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Risc World 3
/
Risc World 3.iso
/
SOFTWARE
/
ISSUE2
/
CDWRITING
/
FRONTEND
/
!AMPlayer
/
!Help
< prev
next >
Wrap
Text File
|
2001-10-15
|
6KB
|
165 lines
AMPlayer
--------
This is a module for playing Audio MPEG files through the computer sound
output. It will select the 8 or 16 bit output depending on the normal
configuration (and availability).
The frontend, !AMPlayer, doesn't do much in itself, apart from providing an
interface to the module from the desktop.
The module has been designed so it is easy to make other frontends, or add
support for the module to existing player-frontends.
!AMPlayer frontend
==================
The frontend is mainly included as an example of how to make your own.
It consists of a display and control part. There is no link between these
two parts (with one exception: Counter mode). It might as well be two
separate programs. The control part simply issues commands and SWIs to the
player module. The display part presents the current state of the module.
This means that any commands issued by something else (e.g. you) will also
cause the display to react in exactly the same way, as if the operation had
been performed using the controls.
Control
-------
The frontend is very simple, and behaves more or less like a normal tape deck.
Dragging an AMPEG file to the window (or double-clicking on one) will ask the
module to play it. The buttons below the display behaves like one would
expect:
"Stop" will stop the playback.
"Play" is used to continue after pausing.
"Pause" stops playback, with the option of continuing from that point.
"Rewind" and "Fast forward" skips back and forth in the track. The sound
quality while doing this may vary a lot, especially if the file is coming
from a slow medium (e.g. a CD). Using these buttons while paused is preferable
in these cases.
"Counter mode" toggles between display of elapsed, total, and remaining time.
With some rare MPEG files (Variable bitrate and ID3v2 containing audio
MPEGs), this may be inaccurate.
"Volume +/-" changes the overall volume. Some files will clip if this is set
higher than -2 dB. If you suffer from clipping noise, lower it.
Another control function of !AMPlayer is, that if you hold shift while
dragging in a file, it will be put on hold (and "QUEUE" will show). When the
current file finishes, playback continues with the one dragged in. There
can be only one file on queue at any time, so dragging in more files like this
will just end up with the last one on hold. Some day this might change, who
knows.
Similarily, holding shift while clicking Stop, will only stop the current
file, and continue with a queued one if any.
"Auto Queue": When playing a file, the directory is scanned, and the next
file is automatically queued. If a directory is met, this is scanned too.
When there are no more files in the directory, the scan is continued in the
parent. When no file can be found, Auto Queue enters a "dormant" state (with
the indicator flashing). If you play a new file in this state, the scan will
be resumed from that file and onwards.
So, this scanning would take some time if there are lots of directories left,
but no MPEG files at all. For this reason, it will skip a maximum of 30 files,
then give up. At some point this limit will be user-defined.
For various reasons, this scanning will not look for files of type AMPEG, but
rather of the same type as was played last time. This is most useful on CDs,
where the type-map isn't set up and the files are all reported as type Data.
Display
-------
Most of the display is fairly self-explanatory. The textual part can show
various things:
If the file contains a valid ID3 tag, the song title and artist are shown.
If not, the leafname is shown. If an error occurs while decoding the stream,
it will be displayed for a few seconds in place of the artist.
AMPlayer module
===============
This is the program that does the actual work. There are various reasons for
wanting to control the module directly instead of through the frontend:
1. You get better control, and can automate things using obey files, etc.
2. You may want to write your own frontend.
3. The fancy frontend uses memory and CPU time that might be better used
elsewhere.
For information on the module, consult the HTML manual supplied with
AMPlayer.
Credits
=======
I have no documentation about the Audio MPEG format. So this module was
produced by porting several other free MPEG decoders, extracting the
necessary bits, then optimising it for RISC OS/ARM. The latter by rewriting
the algorithms in most cases. Therefore, there are concepts and code bits
by many different people left in this module. I will try to list the most
obvious "contributors", as I could certainly not have done it without access
to their work:
Michael Hipp & Oliver Fromme wrote mpg123, which was ported and used.
Tomislav Uzelac wrote "amp", similarily ported and learned from.
ISO MPEG Audio Subgroup Software Simulation Group, dist10 package was used
as the main source of information about the intended functionality, rather
than the actual implementation of it.
Special thanks to Gerph, who has been testing and suggesting for a long
time, has made useful additional programs, and even wrote bits of this file
when I didn't have time :-)
His AMPlayer utilities (and many other useful programs) can be found at:
http://www.movspclr.co.uk/
Many thanks to Robin Watts for taking up the task of providing various
optimisations, and adding features which will appear in later versions of
the module.
And thanks must go to the testers that put up with the early bugs
(in order of appearance)...
Kira, unCiscy, JanM, Zhadnost, Cocodude, MoZes, Lennier, Xargle, Ben,
TwoFlower, Forrey & Nick, as well as all those on the beta testing
mailing list.
License
=======
I don't speak Legalese, so if any lawyers have trouble understanding the
following, please ask a grownup for help.
In its current form, this is free for copying and use by anyone, subject to
the following:
If you want to include any of this as part of a commercial product, you need
my permission.
It can be freely supplied with PD, Freeware, and similar programs, as long as
proper credit is given, and no money is charged for them in any way.
At some point, I will include the source, and this licence will probably be
replaced with the GPL, but that will not affect the status of previous
versions.
Contact
=======
Questions, etc. should be addressed to:
Thomas Olsson
amplayer@armware.dk
New versions can be found at:
http://www.armware.dk/files/